﻿<%@ Page Language="C#" MasterPageFile="Layout/Sample.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SampleWebsite._Default"
    Title="Access Key Highlighter Example" %>
<%@ Register Src="~/Controls/AccessKeyHighlighterOptions.ascx" TagPrefix="uc" TagName="Options" %>
<asp:Content ID="content" runat="server" ContentPlaceHolderID="content">
    <h3>Access Key Highlighter: Standard Form Example</h3>
    <p class="sample-description">
        This page shows an example of using the AccessKeyHighlighter with a standard ASP.NET form. Hold down the
        <asp:Literal ID="litAccessKeyShortcut" runat="server">Alt key</asp:Literal> to see the access keys on this
        form highlighted.
    </p>
    <uc:Options ID="options" runat="server" />
    
    <div class="form customer-form">
        <asp:HiddenField ID="hidCustomerId" runat="server" />
        <fieldset class="personal-details">
            <legend>Personal Details</legend>
            <ol>
                <li class="first-name">
                    <asp:Label ID="lblFirstName" runat="server" AssociatedControlID="txtFirstName" CssClass="required-field">First Name:</asp:Label>
                    <asp:TextBox ID="txtFirstName" runat="server" MaxLength="32" AccessKey="F" ToolTip="First Name" />
                    <ul class="validation-errors">
                        <li><asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName"
                                Display="Dynamic" ValidationGroup="Customer"
                                ErrorMessage="'First Name' is a required field" /></li>
                    </ul>
                </li>
                <li class="last-name">
                    <asp:Label ID="lblLastName" runat="server" AssociatedControlID="txtLastName">Last Name:</asp:Label>
                    <asp:TextBox ID="txtLastName" runat="server" MaxLength="32" AccessKey="L" ToolTip="Last Name" />
                </li>
                <li class="date-of-birth">
                    <asp:Label ID="lblDOB" runat="server" AssociatedControlID="txtDOB">Date of birth:</asp:Label>
                    <asp:TextBox ID="txtDOB" runat="server" MaxLength="11" AccessKey="B" ToolTip="Date of birth, format dd-MMM-yyyy" />
                    <ajax:calendarextender id="calDOB" runat="server" targetcontrolid="txtDOB" format="dd-MMM-yyyy" />
                </li>
            </ol>
        </fieldset>
        <fieldset class="contact-details">
            <legend>Contact Details</legend>
            <ol>
                <li class="home-phone">
                    <asp:Label ID="lblHomePhone" runat="server" AssociatedControlID="txtHomePhone">Home phone:</asp:Label>
                    <asp:TextBox ID="txtHomePhone" runat="server" MaxLength="20" AccessKey="H" ToolTip="Home phone" />
                </li>
                <li class="work-phone">
                    <asp:Label ID="lblWorkPhone" runat="server" AssociatedControlID="txtWorkPhone">Work phone:</asp:Label>
                    <asp:TextBox ID="txtWorkPhone" runat="server" MaxLength="20" AccessKey="W" ToolTip="Work phone" />
                </li>
                <li class="mobile-phone">
                    <asp:Label ID="lblMobilePhone" runat="server" AssociatedControlID="txtMobilePhone">Mobile phone:</asp:Label>
                    <asp:TextBox ID="txtMobilePhone" runat="server" MaxLength="20" AccessKey="M" ToolTip="Mobile phone" />
                </li>
                <li class="email">
                    <asp:Label ID="lblEmail" runat="server" AssociatedControlID="txtEmail" CssClass="required-field">E-mail:</asp:Label>
                    <asp:TextBox ID="txtEmail" runat="server" MaxLength="255" AccessKey="E" ToolTip="E-mail" />
                    <ul class="validation-errors">
                        <li><asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
                                Display="Dynamic" ValidationGroup="Customer" ErrorMessage="'E-mail' is a required field" /></li>
                        <li><cc:EmailValidator ID="emvEmail" runat="server" ControlToValidate="txtEmail"
                                Display="Dynamic" ValidationGroup="Customer"
                                ErrorMessage="Please enter a valid e-mail address, e.g. joe.citizen@tempuri.org" /></li>
                    </ul>
                </li>
            </ol>
        </fieldset>
        <fieldset class="home-address">
            <legend>Home Address</legend>
            <ol>
                <li class="street-1">
                    <asp:Label ID="lblHomeStreet1" runat="server" AssociatedControlID="txtHomeStreet1">Street:</asp:Label>
                    <asp:TextBox ID="txtHomeStreet1" runat="server" MaxLength="128" AccessKey="T" ToolTip="Street" />
                </li>
                <li class="street-2">
                    <asp:Label ID="lblHomeStreet2" runat="server" AssociatedControlID="txtHomeStreet2">&nbsp;</asp:Label>
                    <asp:TextBox ID="txtHomeStreet2" runat="server" MaxLength="128" />
                </li>
                <li class="city">
                    <asp:Label ID="lblHomeCity" runat="server" AssociatedControlID="txtHomeCity">City:</asp:Label>
                    <asp:TextBox ID="txtHomeCity" runat="server" MaxLength="128" AccessKey="I" ToolTip="City" />
                </li>
                <li class="state">
                    <asp:Label ID="lblHomeState" runat="server" AssociatedControlID="ddlHomeState">State:</asp:Label>
                    <asp:DropDownList ID="ddlHomeState" runat="server" ToolTip="State">
                        <asp:ListItem Value="" Text="- select -" />
                        <asp:ListItem Value="ACT" Text="ACT" />
                        <asp:ListItem Value="NSW" Text="NSW" />
                        <asp:ListItem Value="NT" Text="NT" />
                        <asp:ListItem Value="QLD" Text="QLD" />
                        <asp:ListItem Value="SA" Text="SA" />
                        <asp:ListItem Value="TAS" Text="TAS" />
                        <asp:ListItem Value="VIC" Text="VIC" />
                        <asp:ListItem Value="WA" Text="WA" />
                    </asp:DropDownList>
                </li>
                <li class="post-code">
                    <asp:Label ID="lblHomePostCode" runat="server" AssociatedControlID="txtHomePostCode">Post code:</asp:Label>
                    <asp:TextBox ID="txtHomePostCode" runat="server" MaxLength="6" AccessKey="P" ToolTip="Post code" />
                </li>
            </ol>
        </fieldset>
        <dl class="legend">
            <dt class="required-field">This is a required field</dt>
            <dd>indicates a required field</dd>
        </dl>
        <fieldset class="actions">
            <ul>
                <li class="default save">
                    <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="Customer"
                        CommandName="Update" AccessKey="S" ToolTip="Save" />
                </li>
                <li class="cancel">
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false"
                        CommandName="Cancel" AccessKey="C" ToolTip="Cancel" />
                </li>
            </ul>
        </fieldset>
    </div>
    <cc:accesskeyhighlighter id="akh" runat="server" />
</asp:Content>